import request from '../utils/request'

const api_name = '/admin/system/sysMenu'

// 分页列表
export const findNodes = () => {
  return request({
    url: '/admin/system/sysMenu/findNodes',
    method: 'get',
  })
}

// 添加菜单
export const saveMenu = sysMenu => {
  return request({
    url: '/admin/system/sysMenu/saveMenu',
    method: 'post',
    data: sysMenu,
  })
}

// 修改菜单
export const updateMenuById = sysMenu => {
  return request({
    url: '/admin/system/sysMenu/updateMenuById',
    method: 'put',
    data: sysMenu,
  })
}

// 删除菜单
export const removeMenuById = id => {
  return request({
    url: '/admin/system/sysMenu/removeMenuById/' + id,
    method: 'delete',
  })
}
